// 走势图表
<template>
    <div>
        <!-- 操作面板 -->
        <div class="chart-tool-Box flex flex-align-center">
            <div class="sjfxBox">
               <p class="boxtitle">数据分析范围</p>
                <div class="boxinput flex flex-align-center">
                    <p>统计</p>
                    <input type="text" placeholder="30" v-model='titleData' @change="onChange">
                    <p>期</p>
                </div>
            </div>
            <div class="sjfxBox cxfsBox">
               <p class="boxtitle">图表呈现方式</p>
                <div class="boxinput flex flex-align-center">
                    <el-checkbox v-model="checked">显示走势标识</el-checkbox>
                </div>
            </div>
            <div class="sjfxBox qtBox">
               <p class="boxtitle">其它操作</p>
                <div class="boxinput flex flex-align-center flex-pack-center boxBtn" @click="onPreservationFun">
                    <img src="@/assets/img/indexchart/baocun.png" alt="">
                   <p>保存</p>
                </div>
            </div>
        </div>
        <div id='chartBody'>
         <div class="Tips-Box">
             <p class="line-title">统计数据：从{{this.LineData.start_period}}期到{{this.LineData.end_period}}期</p>
             <p class="line-subText">{{this.leftinfoname}}</p>
             <!-- 分页 -->
             <div class="pagingBox flex flex-align-center">
                <p @click="onNextBefore">上一页</p>
                <p class="shouye" @click="onShouYe">首页</p>
                <input type="text" placeholder="1" v-model="Pagenumber">
                <p>共{{this.LineData.per_page}}期</p>
                <p @click="onWeiYe">尾页</p>
                <p @click="onNext">下一页</p>
             </div>
         </div>
         <div style="height:0.45rem"></div>
         <LineChart :chartXData="chartXData"
            :chartYData="chartYData"
            :showLabel='checked' 
            :minScale='minScale'
            :maxScale='maxScale'
            :isLongHu='isLongHu'
            :isOddEven='isOddEven'
            :isBigSmall='isBigSmall'
            :isMidedge='isMidedge'
            :splitNumber='splitNumber'
            :isHezhi = 'isHezhi'
            ></LineChart>
        </div>
    </div>
</template>
<script>
import LineChart from '@/components/LineChart'
import html2canvas from '@/assets/js/html2canvas'
export default {
    components: {
       LineChart 
    },
    data () {
        return {
           titleData:30,  //统计期数
           checked: true, //是否显示走势标识
           titleText: "",
           chartXData:[],
           chartYData:[],
           Pagenumber:1,
           LineData:'',
           lastpage:'',
           maxScale:null,
           minScale:null,
           splitNumber:5,
           isLongHu:'',
           isOddEven:'',
           isBigSmall:'',
           isMidedge:'',
           isHezhi:'',
           menu_type:'',//菜单标识
           load_key:0,
        }
    },
    computed:{
        leftinfoid(){
            return this.$store.state.chartMenu.id;
        },
        leftinfoname(){
            return this.$store.state.chartMenu.name;
        },
        lotteryid(){
            return this.$store.state.lottery_id;
        },
        CaiPiaoType(){
            return this.$store.state.CaiPiaoType;
        },
        leftinfoKey(){
            return this.$store.state.chartMenu;
        }
    },
    watch:{
        leftinfoid(){
            this.getLocationTrendChartLimit();
        },
        leftinfoKey(){
            this.getLocationTrendChartLimit();
        },
        Pagenumber(news){
            if(news<=this.lastpage)
                this.getLocationTrendChartLimit();
        },
    },
    methods: {
        // 限制数据分析范围在30~1000
      onChange(el){
          if(Number(el.target.value) >= 30 && Number(el.target.value)<=1000){
                this.Pagenumber = 1;
                this.getLocationTrendChartLimit();
          }else{
                this.titleData = 30;
                this.Pagenumber = 1;
                this.getLocationTrendChartLimit();
          }
       },

       onPreservationFun(){ //html2image 并保存到本地
            var _self = this;
            let content_html = document.getElementById('chartBody');　　　　//要转化的div
            let width = content_html.offsetWidth*1.2;
            let height = content_html.offsetHeight*2;
            let offsetTop = content_html.offsetTop;
            let canvas = document.createElement("canvas");
            let context = canvas.getContext('2d');
            let scaleBy = Math.ceil(window.devicePixelRatio);
            canvas.width = width*scaleBy;
            canvas.height = (height+offsetTop)*scaleBy;
            context.scale(scaleBy,scaleBy);
            var opts = {
            allowTaint:true,//允许加载跨域的图片
            tainttest:true, //检测每张图片都已经加载完成
            scale:scaleBy, // 添加的scale 参数
            canvas:canvas, //自定义 canvas
            logging: false, //日志开关，发布的时候记得改成false
            width:width, //dom 原始宽度
            height:height //dom 原始高度
            };
            html2canvas(content_html,opts).then(function (canvas) {
            canvas.style.width = width+"px";
            canvas.style.height = height+"px";
            var image = new Image();
            var type = 'png';
            var imgData = canvas.toDataURL(type);
            imgData = imgData.replace(_self.fixType(type),'image/octet-stream');
            // 下载后的图片名
            var filename = _self.leftinfoname + '.' + type;
            // download
            _self.saveFile(imgData,filename);
            });
       }, 

       fixType(type){  //处理生成图片
           type = type.toLowerCase().replace(/jpg/i, 'jpeg');
           var r = type.match(/png|jpeg|bmp|gif/)[0];
            return 'image/' + r;
       },

       saveFile(data, filename){ //保存图片
            var save_link = document.createElementNS('http://www.w3.org/1999/xhtml', 'a');
            save_link.href = data;
            save_link.download = filename;
            var event = document.createEvent('MouseEvents');
            event.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
            save_link.dispatchEvent(event);
       },

       onNextBefore(){ //前一页
        if(this.Pagenumber>1){
            this.Pagenumber --;
        }
       },

       onShouYe(){ //首页
            this.Pagenumber = 1;
       }, 

       onWeiYe(){ //尾页
            this.Pagenumber=this.lastpage;
            var params={
                lottery_id:this.lotteryid,
                play_id:this.$store.state.chartMenu.id,
                limit:30,
                total:this.titleData,
                page:this.lastpage
            }
            this.https("Analyse/getLocationTrendChartLimit",params).then(data=>{
                var xCharts=data.xaxis;
                var arr=[];
                xCharts.forEach(item=>{
                    arr.push(item[0])
                })
                this.chartXData=arr;
                this.LineData=data;
                this.chartYData=data.yaxis;
            })
       },

       onNext(){ //下一页
            if(this.Pagenumber<this.lastpage){
                this.Pagenumber ++;
            }
       },
       
       getLocationTrendChartLimit(){ //获取相关数据;lottery_id=彩种id,play_id=玩儿法id;limit=选择期数;page=页码
            var params={
                lottery_id:this.lotteryid,
                play_id:this.$store.state.chartMenu.id,
                limit:30,
                total:this.titleData,
                page:this.Pagenumber
            }
               this.https("Analyse/getLocationTrendChartLimit",params).then(data=>{
                this.lastpage=data.last_page;
                var xCharts=data.xaxis.splice(0,30);
                var arr=[];
                xCharts.forEach(item=>{
                    arr.push(item[0])
                })
                this.chartXData=arr;
                this.LineData=data;
                this.chartYData=data.yaxis;
                this.menu_type = data.menu_type;
                this.controlY();
            })
       },

        // 根据彩种及菜单返回标识控制Y轴显示
       controlY(){
           if(this.CaiPiaoType == 'ssc'){ //时时彩系列
                switch(this.menu_type){
                    case 1: //位数 数字
                          this.maxScale = 10; //刻度大小
                          this.isBigSmall = false; //是否显示大小
                          this.isLongHu = false; //是否显示龙虎
                          this.isOddEven = false; //是否显示单双
                          this.isMidedge = false; //是否显示中边
                          this.isHezhi = false; //是否显示小双小单大小大单
                          this.minScale = 0; //刻度最小值
                          this.splitNumber = 5; //控制y轴刻度
                        break;
                    case 2: //大小
                          this.maxScale = 1.2; //刻度大小
                          this.isBigSmall = true; //是否显示大小
                          this.isLongHu = false; //是否显示龙虎
                          this.isOddEven = false; //是否显示单双
                          this.isMidedge = false; //是否显示中边
                          this.isHezhi = false; //是否显示小双小单大小大单
                          this.minScale = 0; //刻度最小值
                          this.splitNumber = 5; //控制y轴刻度
                        break;
                    case 3: //单双
                          this.maxScale = 1.2; //刻度大小
                          this.isBigSmall = false; //是否显示大小
                          this.isLongHu = false; //是否显示龙虎
                          this.isOddEven = true; //是否显示单双
                          this.isMidedge = false; //是否显示中边
                          this.isHezhi = false; //是否显示小双小单大小大单
                          this.minScale = 0; //刻度最小值
                          this.splitNumber = 5; //控制y轴刻度
                        break;  
                    case 4: //龙虎
                          this.maxScale = 2.5; //刻度大小
                          this.isBigSmall = false; //是否显示大小
                          this.isLongHu = true; //是否显示龙虎
                          this.isOddEven = false; //是否显示单双
                          this.isMidedge = false; //是否显示中边
                          this.isHezhi = false; //是否显示小双小单大小大单
                          this.minScale = 0; //刻度最小值
                          this.splitNumber = 5; //控制y轴刻度
                        break; 
                }
           }else if(this.CaiPiaoType == 'l28'){ //pc蛋蛋
                switch(this.menu_type){
                    case 1:
                          this.maxScale = 1.2; //刻度大小
                          this.minScale = 0; //刻度最小值
                          this.splitNumber = 5; //控制y轴刻度
                          this.isBigSmall = true; //是否显示大小
                          this.isLongHu = false; //是否显示龙虎
                          this.isOddEven = false; //是否显示单双
                          this.isHezhi = false; //是否显示小双小单大小大单
                          this.isMidedge = false; //是否显示中边
                        break;
                    case 2:
                          this.maxScale = 1.2; //刻度大小
                          this.minScale = 0; //刻度最小值
                          this.splitNumber = 5; //控制y轴刻度
                          this.isBigSmall = false; //是否显示大小
                          this.isLongHu = false; //是否显示龙虎
                          this.isMidedge = false; //是否显示中边
                          this.isHezhi = false; //是否显示小双小单大小大单
                          this.isOddEven = true; //是否显示单双
                     
                        break;
                    case 3:
                          this.maxScale = 1.2; //刻度大小
                          this.minScale = 0; //刻度最小值
                          this.splitNumber = 5; //控制y轴刻度
                          this.isBigSmall = false; //是否显示大小
                          this.isLongHu = false; //是否显示龙虎
                          this.isOddEven = false; //是否显示单双
                          this.isHezhi = false; //是否显示小双小单大小大单
                          this.isMidedge = true; //是否显示中边
                        break;
                    case 4:
                          this.maxScale = 1.2; //刻度大小
                          this.minScale = 0; //刻度最小值
                          this.splitNumber = 5; //控制y轴刻度
                          this.isBigSmall = true; //是否显示大小
                          this.isLongHu = false; //是否显示龙虎
                          this.isOddEven = false; //是否显示单双
                          this.isHezhi = false; //是否显示小双小单大小大单
                          this.isMidedge = false; //是否显示中边
                        break;
                    case 5:
                          this.maxScale = 27; //刻度大小
                          this.isBigSmall = false; //是否显示大小
                          this.isLongHu = false; //是否显示龙虎
                          this.isOddEven = false; //是否显示单双
                          this.isMidedge = false; //是否显示中边
                          this.minScale = 0; //刻度最小值
                          this.isHezhi = false; //是否显示小双小单大小大单
                          this.splitNumber = 14; //控制y轴刻度
                        break; 
                    case 6:
                          this.maxScale = 27; //刻度大小
                          this.isBigSmall = false; //是否显示大小
                          this.isLongHu = false; //是否显示龙虎
                          this.isOddEven = false; //是否显示单双
                          this.isMidedge = false; //是否显示中边
                          this.isHezhi = false; //是否显示小双小单大小大单
                          this.minScale = 22; //刻度最小值
                          this.splitNumber = 4; //控制y轴刻度
                        break; 
                    case 7:
                          this.maxScale = 5; //刻度大小
                          this.isBigSmall = false; //是否显示大小
                          this.isLongHu = false; //是否显示龙虎
                          this.isOddEven = false; //是否显示单双
                          this.isMidedge = false; //是否显示中边
                          this.isHezhi = false; //是否显示小双小单大小大单
                          this.minScale = 0; //刻度最小值
                          this.splitNumber = 4; //控制y轴刻度
                        break;
                    case 8:
                          this.maxScale = 4; //刻度大小
                          this.isBigSmall = false; //是否显示大小
                          this.isLongHu = false; //是否显示龙虎
                          this.isOddEven = false; //是否显示单双
                          this.isMidedge = false; //是否显示中边
                          this.isHezhi = true; //是否显示小双小单大小大单
                          this.minScale = 0; //刻度最小值
                          this.splitNumber = 4; //控制y轴刻度
                        break;
                    case 9:
                          this.maxScale = 3; //刻度大小
                          this.isBigSmall = false; //是否显示大小
                          this.isLongHu = false; //是否显示龙虎
                          this.isOddEven = false; //是否显示单双
                          this.isMidedge = false; //是否显示中边
                          this.isHezhi = false; //是否显示小双小单大小大单
                          this.minScale = 0; //刻度最小值
                          this.splitNumber = 3; //控制y轴刻度
                        break;
                    case 10:
                          this.maxScale = 4; //刻度大小
                          this.isBigSmall = false; //是否显示大小
                          this.isLongHu = false; //是否显示龙虎
                          this.isOddEven = false; //是否显示单双
                          this.isMidedge = false; //是否显示中边
                          this.isHezhi = false; //是否显示小双小单大小大单
                          this.minScale = 0; //刻度最小值
                          this.splitNumber = 4; //控制y轴刻度
                        break;  
                    case 11:
                          this.maxScale = 5; //刻度大小
                          this.isBigSmall = false; //是否显示大小
                          this.isLongHu = false; //是否显示龙虎
                          this.isOddEven = false; //是否显示单双
                          this.isMidedge = false; //是否显示中边
                          this.isHezhi = false; //是否显示小双小单大小大单
                          this.minScale = 0; //刻度最小值
                          this.splitNumber = 5; //控制y轴刻度
                        break;                                          
                }
           }else if(this.CaiPiaoType == 'l11x5'){ //加拿大28
                switch(this.menu_type){
                    case 1:
                        this.maxScale = 11; //刻度大小
                        this.isBigSmall = false; //是否显示大小
                        this.isLongHu = false; //是否显示龙虎
                        this.isOddEven = false; //是否显示单双
                        this.isMidedge = false; //是否显示中边
                        this.isHezhi = false; //是否显示小双小单大小大单
                        this.minScale = 1; //刻度最小值
                        this.splitNumber = 11; //控制y轴刻度
                        break;
                    case 2:
                        this.maxScale = 11; //刻度大小
                        this.isBigSmall = false; //是否显示大小
                        this.isLongHu = false; //是否显示龙虎
                        this.isOddEven = false; //是否显示单双
                        this.isMidedge = false; //是否显示中边
                        this.isHezhi = false; //是否显示小双小单大小大单
                        this.minScale = 1; //刻度最小值
                        this.splitNumber = 11; //控制y轴刻度
                        break; 
                    case 3:
                        this.maxScale = 11; //刻度大小
                        this.isBigSmall = false; //是否显示大小
                        this.isLongHu = false; //是否显示龙虎
                        this.isOddEven = false; //是否显示单双
                        this.isMidedge = false; //是否显示中边
                        this.isHezhi = false; //是否显示小双小单大小大单
                        this.minScale = 1; //刻度最小值
                        this.splitNumber = 11; //控制y轴刻度
                        break;
                    case 4:
                        this.maxScale = 11; //刻度大小
                        this.isBigSmall = false; //是否显示大小
                        this.isLongHu = false; //是否显示龙虎
                        this.isOddEven = false; //是否显示单双
                        this.isMidedge = false; //是否显示中边
                        this.isHezhi = false; //是否显示小双小单大小大单
                        this.minScale = 1; //刻度最小值
                        this.splitNumber = 11; //控制y轴刻度
                        break; 
                    case 5:
                        this.maxScale = 11; //刻度大小
                        this.isBigSmall = false; //是否显示大小
                        this.isLongHu = false; //是否显示龙虎
                        this.isOddEven = false; //是否显示单双
                        this.isMidedge = false; //是否显示中边
                        this.isHezhi = false; //是否显示小双小单大小大单
                        this.minScale = 1; //刻度最小值
                        this.splitNumber = 11; //控制y轴刻度
                        break; 
                    case 6:
                        this.maxScale = 1.2; //刻度大小
                        this.isBigSmall = true; //是否显示大小
                        this.isLongHu = false; //是否显示龙虎
                        this.isOddEven = false; //是否显示单双
                        this.isMidedge = false; //是否显示中边
                        this.isHezhi = false; //是否显示小双小单大小大单
                        this.minScale = 0; //刻度最小值
                        this.splitNumber = 5; //控制y轴刻度
                        break;
                     case 7:
                        this.maxScale = 1.2; //刻度大小
                        this.isBigSmall = false; //是否显示大小
                        this.isLongHu = false; //是否显示龙虎
                        this.isOddEven = true; //是否显示单双
                        this.isMidedge = false; //是否显示中边
                        this.isHezhi = false; //是否显示小双小单大小大单
                        this.minScale = 0; //刻度最小值
                        this.splitNumber = 5; //控制y轴刻度
                        break;
                    case 8:
                        this.maxScale = 1.2; //刻度大小
                        this.isBigSmall = true; //是否显示大小
                        this.isLongHu = false; //是否显示龙虎
                        this.isOddEven = false; //是否显示单双
                        this.isMidedge = false; //是否显示中边
                        this.isHezhi = false; //是否显示小双小单大小大单
                        this.minScale = 0; //刻度最小值
                        this.splitNumber = 5; //控制y轴刻度
                        break;
                    case 9:
                        this.maxScale = 1.2; //刻度大小
                        this.isBigSmall = false; //是否显示大小
                        this.isLongHu = false; //是否显示龙虎
                        this.isOddEven = true; //是否显示单双
                        this.isMidedge = false; //是否显示中边
                        this.isHezhi = false; //是否显示小双小单大小大单
                        this.minScale = 0; //刻度最小值
                        this.splitNumber = 5; //控制y轴刻度
                        break;
                    case 10:
                        this.maxScale = 1.2; //刻度大小
                        this.isBigSmall = false; //是否显示大小
                        this.isLongHu = false; //是否显示龙虎
                        this.isOddEven = true; //是否显示单双
                        this.isMidedge = false; //是否显示中边
                        this.isHezhi = false; //是否显示小双小单大小大单
                        this.minScale = 0; //刻度最小值
                        this.splitNumber = 5; //控制y轴刻度
                        break; 
                    case 11:
                        this.maxScale = 1.2; //刻度大小
                        this.isBigSmall = false; //是否显示大小
                        this.isLongHu = false; //是否显示龙虎
                        this.isOddEven = true; //是否显示单双
                        this.isMidedge = false; //是否显示中边
                        this.isHezhi = false; //是否显示小双小单大小大单
                        this.minScale = 0; //刻度最小值
                        this.splitNumber = 5; //控制y轴刻度
                        break;
                    case 12:
                        this.maxScale = 1.2; //刻度大小
                        this.isBigSmall = false; //是否显示大小
                        this.isLongHu = false; //是否显示龙虎
                        this.isOddEven = true; //是否显示单双
                        this.isMidedge = false; //是否显示中边
                        this.isHezhi = false; //是否显示小双小单大小大单
                        this.minScale = 0; //刻度最小值
                        this.splitNumber = 5; //控制y轴刻度
                        break;
                    case 13:
                        this.maxScale = 1.2; //刻度大小
                        this.isBigSmall = false; //是否显示大小
                        this.isLongHu = false; //是否显示龙虎
                        this.isOddEven = true; //是否显示单双
                        this.isMidedge = false; //是否显示中边
                        this.isHezhi = false; //是否显示小双小单大小大单
                        this.minScale = 0; //刻度最小值
                        this.splitNumber = 5; //控制y轴刻度
                        break; 
                    case 14:
                        this.maxScale = 2.5; //刻度大小
                        this.isBigSmall = false; //是否显示大小
                        this.isLongHu = true; //是否显示龙虎
                        this.isOddEven = false; //是否显示单双
                        this.isMidedge = false; //是否显示中边
                        this.isHezhi = false; //是否显示小双小单大小大单
                        this.minScale = 0; //刻度最小值
                        this.splitNumber = 5; //控制y轴刻度
                        break;   
                    case 15:
                        this.maxScale = 1.2; //刻度大小
                        this.isBigSmall = true; //是否显示大小
                        this.isLongHu = false; //是否显示龙虎
                        this.isOddEven = false; //是否显示单双
                        this.isMidedge = false; //是否显示中边
                        this.isHezhi = false; //是否显示小双小单大小大单
                        this.minScale = 0; //刻度最小值
                        this.splitNumber = 5; //控制y轴刻度
                        break;                                 
                }
           }else if(this.CaiPiaoType == 'pk10'){
               switch(this.menu_type){
                   case 1:
                        this.maxScale = 10; //刻度大小
                        this.isBigSmall = false; //是否显示大小
                        this.isLongHu = false; //是否显示龙虎
                        this.isOddEven = false; //是否显示单双
                        this.isMidedge = false; //是否显示中边
                        this.isHezhi = false; //是否显示小双小单大小大单
                        this.minScale = 1; //刻度最小值
                        this.splitNumber = 10; //控制y轴刻度
                        break; 
                    case 11:
                        this.maxScale = 1.2; //刻度大小
                        this.isBigSmall = true; //是否显示大小
                        this.isLongHu = false; //是否显示龙虎
                        this.isOddEven = false; //是否显示单双
                        this.isMidedge = false; //是否显示中边
                        this.isHezhi = false; //是否显示小双小单大小大单
                        this.minScale = 0; //刻度最小值
                        this.splitNumber = 5; //控制y轴刻度
                        break; 
                    case 21:
                        this.maxScale = 1.2; //刻度大小
                        this.isBigSmall = false; //是否显示大小
                        this.isLongHu = false; //是否显示龙虎
                        this.isOddEven = true; //是否显示单双
                        this.isMidedge = false; //是否显示中边
                        this.isHezhi = false; //是否显示小双小单大小大单
                        this.minScale = 0; //刻度最小值
                        this.splitNumber = 5; //控制y轴刻度
                        break;
                    case 31:
                        this.maxScale = 2.5; //刻度大小
                        this.isBigSmall = false; //是否显示大小
                        this.isLongHu = true; //是否显示龙虎
                        this.isOddEven = false; //是否显示单双
                        this.isMidedge = false; //是否显示中边
                        this.isHezhi = false; //是否显示小双小单大小大单
                        this.minScale = 0; //刻度最小值
                        this.splitNumber = 5; //控制y轴刻度
                        break;
               }
           }else if(this.CaiPiaoType == 'k3'){ //江苏快3
               switch(this.menu_type){
                   case 1:
                        this.maxScale = 1.2; //刻度大小
                        this.isBigSmall = true; //是否显示大小
                        this.isLongHu = false; //是否显示龙虎
                        this.isOddEven = false; //是否显示单双
                        this.isMidedge = false; //是否显示中边
                        this.isHezhi = false; //是否显示小双小单大小大单
                        this.minScale = 0; //刻度最小值
                        this.splitNumber = 5; //控制y轴刻度
                        break;
                    case 5:
                        this.maxScale = 1.2; //刻度大小
                        this.isBigSmall = false; //是否显示大小
                        this.isLongHu = false; //是否显示龙虎
                        this.isOddEven = true; //是否显示单双
                        this.isMidedge = false; //是否显示中边
                        this.isHezhi = false; //是否显示小双小单大小大单
                        this.minScale = 0; //刻度最小值
                        this.splitNumber = 5; //控制y轴刻度
                        break;
               }
           }else if(this.CaiPiaoType == 'l3d'){ // 福彩3d
                switch(this.menu_type){
                    case 1:
                       this.maxScale = 9; //刻度大小
                       this.isBigSmall = false; //是否显示大小
                        this.isLongHu = false; //是否显示龙虎
                        this.isOddEven = false; //是否显示单双
                        this.isMidedge = false; //是否显示中边
                        this.isHezhi = false; //是否显示小双小单大小大单
                        this.minScale = 0; //刻度最小值
                        this.splitNumber = 4; //控制y轴刻度
                        break;
                    case 4:
                        this.maxScale = 1.2; //刻度大小
                        this.isBigSmall = false; //是否显示大小
                        this.isLongHu = false; //是否显示龙虎
                        this.isOddEven = true; //是否显示单双
                        this.isMidedge = false; //是否显示中边
                        this.isHezhi = false; //是否显示小双小单大小大单
                        this.minScale = 0; //刻度最小值
                        this.splitNumber = 5; //控制y轴刻度
                        break;
                    case 7:
                        this.maxScale = 1.2; //刻度大小
                        this.isBigSmall = true; //是否显示大小
                        this.isLongHu = false; //是否显示龙虎
                        this.isOddEven = false; //是否显示单双
                        this.isMidedge = false; //是否显示中边
                        this.isHezhi = false; //是否显示小双小单大小大单
                        this.minScale = 0; //刻度最小值
                        this.splitNumber = 5; //控制y轴刻度
                        break;
                }
           }
       }
    } 
}
</script>
<style lang="less" scoped>
@import url(../../assets/css/indexchart/trend.less);
</style>




